
import 'package:json_annotation/json_annotation.dart';

part 'foot_print_entity.g.dart';

@JsonSerializable()
class FootPrintEntity {
  int? total;
  int? pages;
  int? limit;
  int? page;
  List<FootPrintGoodsEntity>? xList;

  FootPrintEntity({
    this.total,
    this.pages,
    this.limit,
    this.page,
    this.xList,
  });

  factory FootPrintEntity.fromJson(Map<String, dynamic> json) => _$FootPrintEntityFromJson(json);

  Map<String, dynamic> toJson() => _$FootPrintEntityToJson(this);
}

@JsonSerializable()
class FootPrintGoodsEntity {
  String? brief;
  String? picUrl;
  String? name;
  double? counterPrice;
  int? id;
  bool? isNew;
  double? retailPrice;
  bool? isHot;
  bool isCheck = false; // Changed to nullable bool
  int? goodsId;

  FootPrintGoodsEntity({
    this.brief,
    this.picUrl,
    this.name,
    this.counterPrice,
    this.id,
    this.isNew,
    this.retailPrice,
    this.isHot,
    this.goodsId,
  });

  factory FootPrintGoodsEntity.fromJson(Map<String, dynamic> json) => _$FootPrintGoodsEntityFromJson(json);

  Map<String, dynamic> toJson() => _$FootPrintGoodsEntityToJson(this);
}